package com.imooc.controller;

import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.imooc.grace.utils.AliCloudProperties;
import com.imooc.grace.utils.Sample;
import com.imooc.pojo.Strundent;
import com.imooc.pojo.Stu;
import com.imooc.service.StuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/word")
@Slf4j
public class WordController {

    @Autowired
    private StuService stuService;

    @Autowired
    private AliCloudProperties aliCloudProperties;

    @Value("${server.port}")
    private  String port;


    @RequestMapping("/in")
    public void startent() throws Exception {
        Stu  stu = new Stu();
        stu.setAge(99);
        stu.setName("王福哲");
        //stuService.insertStu(stu);
        System.out.println("----------------->>>");
        Strundent st = new Strundent("123","123");
        log.info("打印日志: ======> " +st.toString() );
        log.debug("打印日志: ======> " +st.toString() );
        log.warn("打印日志: ======> " +st.toString() );
        System.out.println("------打印ip----------->>>" + port);
        System.out.println("------aliCloudProperties----------->>>" + aliCloudProperties);
        log.warn("打印日志: ====aliCloudProperties==> " +aliCloudProperties );
        //SendSmsResponse sendSmsResponse = Sample.sendSms("13658639805","134567543");
    }
}
